<template>
  <el-dialog v-model="isOpen" title="JavaScript" width="1000" :before-close="handleClose">
    <MonacoEdit v-model="props.data" />
    <template #footer>
      <div class="dialog-footer">
        <el-button @click="emit('editOk')">Cancel</el-button>
        <el-button type="primary" @click="emit('editOk')"> 确定 </el-button>
      </div>
    </template>
  </el-dialog>
</template>
<script setup>
import MonacoEdit from '@/views/template/util/MonacoEdit.vue'
import { defineModel, defineProps } from 'vue'
const isOpen = defineModel('isOpen')
const props = defineProps(['data'])
const emit = defineEmits(['editOk'])
// 叉掉弹出框
function handleClose(done) {
  done()
}
</script>
<style scoped></style>
